Validate that a Bedrock model or inference profile is available and enabled before attempting to use it#232
Conversation
…nabled before attempting to use it
|
Lexical Graph Coverage Report: The coverage is at 45.9% (target: 80%). Download the HTML report here. |
|
Lexical Graph Coverage Report: The coverage is at 45.9% (target: 80%). Download the HTML report here. |
| @@ -795,97 +795,19 @@ | |||
| "Fn::Sub": "arn:${AWS::Partition}:bedrock:*::foundation-model/anthropic.claude-3-5-haiku-20241022-v1:0" | |||
There was a problem hiding this comment.
is it intentional to keep haiku 3.5 and sonnet 4.6?
There was a problem hiding this comment.
let's discuss which model to keep across the project and open a separate issue for making the change to keep it consistent
There was a problem hiding this comment.
I think here it's only listed in IAM policies so the SageMaker notebook has permission to invoke it if a user chooses to
|
@oussamahansal The majority of integration tests are failing here with |
|
@iansrobinson Thanks for checking, I was able to reproduce it. The root cause is that the CFN templates hardcoded specific models in the IAM policy ARNs, the IAM role only grants the exact models listed in the template (anthropic.claude-sonnet-4-6.). If the test code or defaults reference a model that doesn't exactly match those ARNs, the call gets denied. I fixed it by replacing the hardcoded per-model IAM ARNs with wildcards. Now we have 2 wildcard entries: Basically now any Anthropic model works without needing a template update, any inference profile prefix is covered. Note: |
|
Lexical Graph Coverage Report: The coverage is at 45.9% (target: 80%). Download the HTML report here. |
Issue #176
Description of changes:
resolves #176
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.